9f9779f8ff4d0ac7aec41adcacf94e5e2118cf77,jaxrs/src/main/java/org/killbill/billing/jaxrs/resources/AdminResource.java,AdminResource,getNotifications,#String#String#boolean#boolean#DateTime#number#number#,395
Before Change
}
}
notifications.addAll(notificationsForQueue);
if (includeHistory) {
if (accountRecordId != null) {
notifications.addAll(notificationQueue.getHistoricalNotificationForSearchKeys(accountRecordId, tenantRecordId));
} else {
notifications.addAll(notificationQueue.getHistoricalNotificationForSearchKey2(minEffectiveDate, tenantRecordId));
}
After Change
@Nullable final DateTime maxEffectiveDate,
@Nullable final Long accountRecordId,
final Long tenantRecordId) {
Iterable<NotificationEventWithMetadata<NotificationEvent>> notifications = ImmutableList.<NotificationEventWithMetadata<NotificationEvent>>of();
for (final NotificationQueue notificationQueue : notificationQueueService.getNotificationQueues()) {
if (queueName != null && !queueName.equals(notificationQueue.getQueueName())) {
continue;
} else if (serviceName != null && !serviceName.equals(notificationQueue.getServiceName())) {
continue;
}
if (includeInProcessing) {
if (accountRecordId != null) {
notifications = Iterables.<NotificationEventWithMetadata<NotificationEvent>>concat(notifications,
notificationQueue.getFutureOrInProcessingNotificationForSearchKeys(accountRecordId, tenantRecordId));
} else {
notifications = Iterables.<NotificationEventWithMetadata<NotificationEvent>>concat(notifications,
notificationQueue.getFutureOrInProcessingNotificationForSearchKey2(maxEffectiveDate, tenantRecordId));
}
} else {
if (accountRecordId != null) {
notifications = Iterables.<NotificationEventWithMetadata<NotificationEvent>>concat(notifications,
notificationQueue.getFutureNotificationForSearchKeys(accountRecordId, tenantRecordId));
} else {
notifications = Iterables.<NotificationEventWithMetadata<NotificationEvent>>concat(notifications,
notificationQueue.getFutureNotificationForSearchKey2(maxEffectiveDate, tenantRecordId));
}
}
if (includeHistory) {
if (accountRecordId != null) {
notifications = Iterables.<NotificationEventWithMetadata<NotificationEvent>>concat(notificationQueue.getHistoricalNotificationForSearchKeys(accountRecordId, tenantRecordId),
notifications);
} else {
notifications = Iterables.<NotificationEventWithMetadata<NotificationEvent>>concat(notificationQueue.getHistoricalNotificationForSearchKey2(minEffectiveDate, tenantRecordId),
notifications);